package com.xsomnus.network_programming.netty.heartbeat;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.timeout.IdleStateHandler;

/**
 * @author 叶小夏
 * @since 2019-08-16 17:42
 */
public class ServerHandlerInitializer extends ChannelInitializer<SocketChannel> {

    @Override
    protected void initChannel(SocketChannel ch) throws Exception {
        ch.pipeline().addLast(new IdleStateHandler(10, 30, 12));
        ch.pipeline().addLast(new ServerBizHandler());
    }
}
